﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WebTraderLiteCL
{
    public class UserTransaction : Transaction
    {
        enum transactions { BUY, SELL};

        public UserTransaction(string transactionType, Stock stock, int numShares)
        {
            this.transType = transactionType; //Assumes transactionType is 1 of BUY or SELL
            this.stock = stock;
            this.noShares = numShares;
        }
        
        
        public override int Execute()
        {

            //exceptions for when user transaction is not initialized properly?
            
            //perform the transaction
            if (this.transType == transactions.BUY.ToString())
            {
                //Buy
                Console.Write("transactiontype: {0}\n", transactions.BUY.ToString());
            }
            else
            {
                //Sell

            }
            return (0);
        }
    }
}
